package com.mytwo.mysecond.dao;

import com.mytwo.mysecond.bean.UserDO;
import com.mytwo.mysecond.mapper.UserDOMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
* The Table USER.
* USER
*/
@Repository
public class UserDAO{

    @Autowired
    private UserDOMapper userDOMapper;


    public Long insert(UserDO entity){
        return userDOMapper.insert(entity);
    }

    public Long update(UserDO entity){
        return userDOMapper.update(entity);
    }

    public Long deleteByPrimary(Long id){
        return userDOMapper.deleteByPrimary(id);
    }

    public UserDO getByPrimary(Long id){
        return userDOMapper.getByPrimary(id);
    }
    public UserDO getByUserNameAndPassword(String userName, String passWord){
        return userDOMapper.getByUserNameAndPassword(userName,passWord);
    }
}
